package com.example.hangzhou.welbeing.mytestdemoapp.designPatterns.AbstractFactory.factory;

import com.example.hangzhou.welbeing.mytestdemoapp.designPatterns.AbstractFactory.FactoryTest.FactoryMyShapeTest_01;
import com.example.hangzhou.welbeing.mytestdemoapp.designPatterns.AbstractFactory.FactoryTest.FactoryMyShapeTest_02;
import com.example.hangzhou.welbeing.mytestdemoapp.designPatterns.AbstractFactory.FactoryTest.FactoryMyShapeTest_03;
import com.example.hangzhou.welbeing.mytestdemoapp.designPatterns.AbstractFactory.inter.MyColor;
import com.example.hangzhou.welbeing.mytestdemoapp.designPatterns.AbstractFactory.inter.MyShape;

/**
 * 杭州惟君医疗科技有限公司18
 * Created by 20433 on 2018/5/16
 *
 * @desc 东风山河绿，春已不折柳，繁花看不尽，处处惹人留
 * @desc 佛祖镇楼，bug辟容易
 */

public class ShapeFactory extends AbstractFactory {
    @Override
    public MyColor getColor(String color) {
        return null;
    }

    @Override
    public MyShape getShape(String shape) {
        if(shape  == null){
            return null;
        }
        switch (shape){
            case "CIRCLE":
                return new FactoryMyShapeTest_01();
            case "RECTANGLE":
                return new FactoryMyShapeTest_02();
            case "SQUARE":
                return new FactoryMyShapeTest_03();
        }
        return null;
    }
}
